package com.zhkeshe.keshe.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhkeshe.keshe.entity.Device;
import com.zhkeshe.keshe.entity.FengShanUse;
import com.zhkeshe.keshe.entity.UserDevice;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface FengShanUseMapper extends BaseMapper<FengShanUse> {
    @Select("select *from [fengshanuse] where userId=#{userId}")
    FengShanUse selectByUserID(Integer userId);
    @Insert("INSERT INTO [fengshanuse] (userId,openNum, closeNum,useOneNum,useTwoNum,useThreeNum) VALUES (#{userId},#{openNum}, #{closeNum}, #{useOneNum}, #{useTwoNum}, #{useThreeNum})")
    public void insertFengShanUse(FengShanUse fengShanUse);
    @Update("update [fengshanuse] set  userId= #{userId},openNum=#{openNum}, closeNum=#{closeNum},useOneNum= #{useOneNum},useTwoNum= #{useTwoNum}, useThreeNum=#{useThreeNum} where userId= #{userId}")
    public void updateFengShanUse(FengShanUse fengShanUse);
}
